package com.qen.wrapper.support;

import lombok.AllArgsConstructor;
import lombok.Data;
import org.beetl.sql.clazz.kit.StringKit;

import java.io.Serializable;

/**
 * @author licz
 * @since 1.0.0
 */
@Data
@AllArgsConstructor
public class ColumnCache implements Serializable {

    private static final long serialVersionUID = -4586291538088403456L;

    /**
     * 使用 column
     */
    private String column;
    /**
     * 查询 column
     */
    private String columnSelect;
    /**
     * mapping
     */
    private String mapping;

    public ColumnCache(String column, String columnSelect) {
        this.column = column;
        this.columnSelect = columnSelect;
    }

    public ColumnCache(String column) {
        this.column = StringKit.deCodeUnderlined(column);
        this.columnSelect = column;
    }
}
